﻿<Window x:Class="ClearMine.Dialogs.AboutDialog" x:ClassModifier="internal"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:f="clr-namespace:ClearMine.Framework;assembly=ClearMine.Framework"
        xmlns:c="clr-namespace:ClearMine.Framework.Controls;assembly=ClearMine.Framework"
        c:WindowExt.ResizeMode="NoResize"
        Background="{StaticResource DialogBackground}"
        TextOptions.TextFormattingMode="Display"
        WindowStartupLocation="CenterOwner"
        SizeToContent="WidthAndHeight"
        Title="{DynamicResource AboutDialogTitle}"
        ShowInTaskbar="False"
        ResizeMode="NoResize"
        Style="{DynamicResource MainWindowStyle}">
    <Window.CommandBindings>
        <x:Static Member="f:UICommandBindings.CloseBinding" />
    </Window.CommandBindings>
    <DockPanel Margin="12">
        <DockPanel DockPanel.Dock="Bottom"
                   LastChildFill="False">
            <Button Content="{DynamicResource OKButtonLabel}"
                    DockPanel.Dock="Right"
                    IsCancel="True"
                    IsDefault="True" />
            <Button DockPanel.Dock="Left"
                    Cursor="Hand"
                    Click="OnDonateButtonClick">
                <Button.Style>
                    <Style TargetType="{x:Type Button}"
                           BasedOn="{StaticResource {x:Type Button}}">
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="{x:Type Button}">
                                    <Grid>
                                        <TextBlock Margin="5,2,0,2"
                                                   VerticalAlignment="Bottom">
                                            <Hyperlink Focusable="False"><Run Text="{DynamicResource DonateLinkText}"/></Hyperlink>
                                        </TextBlock>
                                        <ContentPresenter />
                                    </Grid>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </Button.Style>
                <Image Stretch="None"
                       Source="{DynamicResource DonateImage}"/>
            </Button>
        </DockPanel>
        <DockPanel Margin="0,0,0,12">
            <Border Background="{StaticResource MineBrush}"
                    Width="48" Height="48"
                    UseLayoutRounding="True"
                    Margin="0,0,12,0"/>
            <TextBlock>
                <Run Text="{DynamicResource GameName}"
                     FontSize="16" FontWeight="Bold" />
                <Run Text="{DynamicResource GameVersion}" />
                <LineBreak />
                <LineBreak />
                <Run Text="{DynamicResource GameCopyRight}" />
            </TextBlock>
        </DockPanel>
    </DockPanel>
</Window>
